<template>
  <h2>props的改写</h2>
  <Child :count="count" name="tom" @abc="fn" />
</template>

<script setup>
// setup属性的时候，组件只需要引入，不需要注册了
import Child from "./components/09-child.vue";

import { ref } from "vue";

const count = ref(5);
const fn = (n) => {
  count.value += n;
};
</script>

<!-- <script>
import Child from "./components/09-child.vue";

export default {
  setup() {},
  // components选项不能写到setup里面
  components: {
    Child,
  },
};
</script> -->
